<?php
session_start();

use evertcode\Util as Tools;

require_once '../../lib/class.util.php';

$tools = new Tools();

if ($_SESSION['userAgent'] !== md5($_SERVER['HTTP_USER_AGENT']) && $_SESSION['IPaddress'] !== $tools->ExtractUserIpAddress()) {
    header("location: ../../?AccessNotAuthorized=:(");
    exit();
}
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 lt8"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7 lt8"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8 lt8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> 

<html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Agenda</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
        <meta name="description" content="" />
        <meta name="keywords" content= "" />
        <meta name="author" content="Evert Code" />
        <link rel="stylesheet" href="../../script/jquery/validationengine/validationEngine.jquery.css" type="text/css" />
        <link rel="stylesheet" type="text/css" media="screen" href="../../script/bootstrap/css/bootstrap.css" />
        <link rel="stylesheet" type="text/css" href="../../script/bootstrap/dialog/css/bootstrap-dialog.css" />
    </head>

    <body>

        <div id="wrap">
            <div class="container">

				<div class="row">
				<?php include("../menu.php"); ?>
				</div>                
				
				<div class="row">
                    <div class="col-md">
                        <div class="row">
                            <div class="col-lg-10">
                                <h3>Comercios</h3>
                            </div>
                        </div>
                        <br/>
						
                        <div class="table-responsive">
                            <table id="tb-agenda" class="table table-hover">
                                <thead>
                                    <tr>                    
                                        <th>Rubro</th>
                                        <th>Nombre</th>
                                        <th>Dirección</th>
                                        <th>Detalle</th>
                                        <th>Teléfono</th>
										<th>Fecha de Alta</th>
										<th>Celular</th>
										<th>Email</th>
										<th><button type="button" id="agregar" class="btn btn-success">Agregar Comercio</button></th>
                                    </tr>
                                </thead>
                                <tbody></tbody>
                                <tfoot></tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

		
		
<!--Agregar campo comercio-->
        <div class="modal fade" id="dialog-add" tabindex="-1" role="dialog" aria-labelledby="title-asignar" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" id="titulo"> </h4>
                    </div>
                    <div class="modal-body">
                        <form id="form-add" class="form-horizontal" role="form" autocomplete="on">
                            <div class="form-group">
                                <label for="id_rubro" class="col-sm-3 control-label">Rubro</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="id_rubro" name="id_rubro">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="nombre" class="col-sm-3 control-label">Nombre</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="nombre" name="nombre">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="direccion" class="col-sm-3 control-label">Dirección</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="direccion" name="direccion">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="detalle" class="col-sm-3 control-label">Detalle</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="detalle" name="detalle">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="telefono" class="col-sm-3 control-label">Teléfono</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="telefono" name="telefono">
                                </div>
                            </div>
							<div class="form-group">
                                <label for="celular" class="col-sm-3 control-label">Celular</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="celular" name="celular">
                                </div>
                            </div>
							<div class="form-group">
                                <label for="email" class="col-sm-3 control-label">Email</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control validate[required]" id="email" name="email">
                                </div>
                            </div>
							
                    </div>
                    <div class="modal-footer">
                        <button type="button" id="btn-add" class="btn btn-success" >Aceptar</button>
                        <button type="button" id="btn-cancel" class="btn btn-danger">Cancelar</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

		
		
			
        <!-- Modal -->
        <div class="modal fade" id="dialog-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
                        <h4 class="modal-title" id="myModalLabel">Eliminar Contacto</h4>
                    </div>
                    <div class="modal-body" id="info"></div>
                    <div class="modal-footer">
                        <button type="button" id="yes" class="btn btn-primary">Si</button>
                        <button type="button" class="btn btn-danger" data-dismiss="modal">No</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <a id="DATA" data-id="" data-option=""></a> 
        <script src="../../script/jquery/jquery.min.js"></script>
        <script type="text/javascript" src="../../script/jquery/jquery.clearForm.js"></script>
        <script type="text/javascript" src="../../script/jquery/validationengine/jquery.validationEngine-es.js"></script>
        <script type="text/javascript" src="../../script/jquery/validationengine/jquery.validationEngine.js" charset="utf-8"></script>
        <script src="../../script/bootstrap/js/bootstrap.min.js"></script>
        <script typer="text/javascript" src="../../script/bootstrap/dialog/js/bootstrap-dialog.js"></script>
        <script src="js/app.js"></script>
    </body>
</html>